= simple_form_for([:admin, @item], html: { 'data-form-manager-model' => @item.class.name, 'data-form-manager-info' => (@form_manager.present? ? @form_manager.to_json : nil) }) do |f|
  == render 'fae/shared/form_header', header: @klass_name, languages: true

  main.content
    = fae_input f, :name_en, wrapper_html: { data: { test: 'do not overwrite me' } }, wrapper_class: 'test-class'
    = fae_input f, :name_zh
    = fae_input f, :name_frca
    = fae_input f, :description_en
    = fae_input f, :description_zh
    = fae_input f, :description_frca
    = fae_input f, :food_pairing_en
    = fae_input f, :food_pairing_zh
    = fae_input f, :food_pairing_ja
    = fae_cta_form f, :test_cta_en
    = fae_cta_form f, :test_cta_zh
    = fae_cta_form f, :test_cta_ja
    // need for testing
    = fae_association f, :releases

    = fae_image_form f, :image_en
    = fae_image_form f, :image_frca
    = fae_file_form f, :pdf_en
    = fae_file_form f, :pdf_frca

- if params[:action] == 'edit'
  section.content#oregon_winemakers_section
    = render 'fae/shared/nested_table',
      assoc: :oregon_winemakers,
      assoc_name: 'winemakers',
      assoc_name_singular: 'winemaker',
      parent_item: @item,
      cols: [:name, :winemaker_image, :table_image],
      new_path: "/admin/winemakers/new?region_type=1",
      ordered: true,
      edit_column: true,
      header: 'Oregon Winemaker',
      title: 'Oregon Winemakers'

  section.content#california_winemakers_section
    = render 'fae/shared/nested_table',
      assoc: :california_winemakers,
      assoc_name: 'winemakers',
      assoc_name_singular: 'winemaker',
      parent_item: @item,
      cols: [:name, :winemaker_image, :table_image],
      new_path: "/admin/winemakers/new?region_type=2",
      ordered: true,
      edit_column: true,
      header: 'California Winemaker',
      title: 'California Winemakers'

